package com.registration.web.utils.jackson;

import org.codehaus.jackson.Version;
import org.codehaus.jackson.map.Module;
import org.hibernate.SessionFactory;

/**
 * Created by IntelliJ IDEA.
 * User: lruiz
 * Date: 5/25/11
 * Time: 11:57 PM
 * To change this template use File | Settings | File Templates.
 */
public class GetModule extends Module {
    private static final String NAME = "GetModule";
    private static final Version VERSION = new Version(1,0,0, null);
    private SessionFactory sessionFactory;

    public GetModule(SessionFactory sessionFactory) {
        this.sessionFactory = sessionFactory;
    }

    @Override
    public String getModuleName() {
        return NAME;
    }

    @Override
    public Version version() {
        return VERSION;
    }

    public SessionFactory getSessionFactory() {
        return sessionFactory;
    }

    @Override
    public void setupModule(SetupContext context) {
//        context.addDeserializers(new GetDeserializers(this));
//        context.addSerializers(new GetSerializers());
//        context.addBeanSerializerModifier(new GetBeanSerializerModifier());
//        context.addBeanDeserializerModifier(new GetBeanDeserializerModifier(sessionFactory));
    }
}
